import axios from 'axios';

export default {
    getContractDictData() {
        return axios({
            url: '/api/fm_front_dict/getFrontData/true',
            method: 'get'
        });
    },
    getDictDataByDictTypeList(data) {
        return axios({
            url: '/api/dictionary/getDataByTypeList',
            method: 'post',
            data
        });
    },
    getOftenTypeByUserId() {
        return axios({
            url: '/api/commpany_pm_type/getOftenTypeByUserId',
            method: 'get'
        });
    },
    getMatTypeByWmsMatType(data) {
        return axios({
            url: '/api/commpany_pm_type/getMatTypeByWmsMatType',
            method: 'post',
            data
        });
    },
    getAllMatTypeList() {
        return axios({
            url: '/api/platform_material/getAllMatTypeList',
            method: 'get'
        });
    },
    // 获取所有可用运营企业
    getAllUserCompany() {
        return axios({
            url: '/api/s_company/getAllUserCompany',
            method: 'get'
        });
    },
    // 获取当前客户运营企业
    getCompanyByCustomerId(customerId) {
        return axios({
            url: '/api/s_company/getCompanyByCustomerId/' + customerId,
            method: 'get'
        });
    },

    getBusinessCodeByTypeList(body) {
        return axios({
            url: '/api/codec_business_code/getDataByTypeList',
            method: 'post',
            data: body
        });
    },

    getSeaShipPortList (body) {
        return axios({
            url: '/code/api/seashipport',
            method: 'post',
            data: body
        });
    },
    selectMatName(body) {
        return axios({
            url: '/api/platform_material/selectListAll',
            method: 'get'
        });
    }
}
